package com.feihong.txgw.inter.contract.mendian;

import com.feihong.txgw.model.bean.nearby.NearbyModel;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseFragment;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName IMenDainContract
 * @package com.feihong.txgw.inter.contract.mendian
 * @data 2018/5/4 19:24
 * @Describe
 * @Change
 */
public interface IMenDainContract {

    interface IMenDianMainView extends IBaseFragment{

        /**
         * 绑定门店数据
         * @param storeDatas
         */
        void loadInfoResult(boolean isFullPage,List<NearbyModel.DataBean.ListBean> storeDatas);

        /**
         * 数据加载完毕
         */
        void loadEnd();

        /**
         * 其他错误
         * @param waringMsg
         */
        void loadOtherError(String waringMsg);
    }

    interface IMenDianMainModel extends IBaseModel{

        /**
         * 获取门店列表
         * @param url
         * @param mParams
         * @return
         */
        Observable<NearbyModel> getLoadMenDianInfo(String url,Map<String,String> mParams);
    }

    abstract class AbMenDianMainPrecenter extends AbBasePrecenter<IMenDianMainModel,IMenDianMainView>{

      public abstract void loadMenDianInfo(String url,Map<String,String> mParams);

      public abstract void loadMenDianInfoFirs(String url,Map<String,String> mParams);
    }
}
